<template>
  <div class="bread">
    <div class="left">
      <a-image :preview="false" width="26"  class="headerIcon" :src="breadIcon" />
      <a-breadcrumb separator="~" >
      <a-breadcrumb-item v-for="(item,index) in BreadcrumbList" :key="index">
        {{ item.meta.title }}
      </a-breadcrumb-item>
    </a-breadcrumb>
    </div>
    <div class="right">
      当前在线人数: 100
    </div>
  </div>

  <a-divider ></a-divider>
</template>

<script setup lang='ts'>
import { computed, onMounted, ref   } from "vue"
import { useRoute } from "vue-router";
import breadIcon from "@/assets/header/icon/bread.svg"

const route = useRoute()
const BreadcrumbList = computed(()=>{
  return route.matched.filter(item=>{
  return {title:item.meta.title,path:item.path}}
  )
})

onMounted(()=>{
})


</script>
<style scoped>
.arco-breadcrumb  >>> .arco-breadcrumb-item{
  color: white !important;
}
</style>
<style lang="scss" scoped>
.arco-divider-horizontal{
margin: 0;
}
.bread{
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .left{
    display: flex;
    align-items: center;
  }
  .right{
    font-size: 12px;
  }
}
.arco-image{
  display: flex;
  align-items: center;
}
</style>
